package day07;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Emp {
	String name;
	int age;
	String gender;
	int salary;
	Date hiredate;

	public Emp(String name, int age, String gender, int salary, Date hiredate) {
		super();
		this.name = name;
		this.age = age;
		this.gender = gender;
		this.salary = salary;
		this.hiredate = hiredate;
	}

	@Override
	public String toString() {
		SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
		String date = fmt.format(hiredate);

		return "Emp [name=" + name + ", age=" + age +
				", gender=" + gender + ", salary=" + salary + ", hiredate=" + date
				+ "]";
	}

}
